<?php
include("../common.inc.php");
InitGP(array("page","action","mid","delids")); //初始化变量全局返回
include("function_common.php");
//初始化对象
include(INC_PATH."/moneychanges.class.php");
$mc=new MchangesClass();

if(empty($action)){
	InitGP(array("order_sn","tid")); //初始化变量全局返回
	if(!empty($order_sn))$wherestr[]="O.order_sn = '{$order_sn}'";
	if(!empty($tid))$wherestr[]="O.tid='{$tid}'";
	if(!empty($wherestr)) $wheresql = implode(' AND ', $wherestr);	//条件汇总
	if(!empty($order_sn))$wherestrc[]="order_sn = '{$order_sn}'";
	if(!empty($tid))$wherestrc[]="tid='{$tid}'";
	if(!empty($wherestr)) $wheresqlc = implode(' AND ', $wherestrc);	//条件汇总
	
	
	//获取当前页码
	$total=$mc->getcount($wheresqlc); 							  //总信息数
	$pagesize=15;												  //一页显示信息数
	$page = isset($page) ? max(1, intval($page)) : 1;             //处理页码变量
	$mcffset=($page-1)*$pagesize;   								  //偏移量
	$dataarray=$mc->getdata("$mcffset,$pagesize",$wheresql,"",$type="ALL"); //获取团购数据

	//包含后台模板文件
	include("tpl/moneychanges_list.htm");
}


?>

